#!/bin/bash

#Determine paths
SCRIPT_PATH=`dirname "$0"`
SCRIPT_PATH=`cd $SCRIPT_PATH; pwd`
LIB_PATH=`cd $SCRIPT_PATH/../lib; pwd`

#Include common functions
source $SCRIPT_PATH/common-functions

ensure_java_precense

# Main program

# Run
if [ $# == 0 ]; then
	cat /dev/stdin | java -jar $LIB_PATH/interpreter-${version}-bin.jar
else
	java -jar $LIB_PATH/interpreter-${version}-bin.jar -i $1
fi
